/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "paymentmode")
@XmlRootElement(name = "paymentmode")
@NamedQueries({
    @NamedQuery(name = "Paymentmode.findAll", query = "SELECT p FROM Paymentmode p"),
    @NamedQuery(name = "Paymentmode.findByPaymentmodeID", query = "SELECT p FROM Paymentmode p WHERE p.paymentmodeID = :paymentmodeID"),
    @NamedQuery(name = "Paymentmode.findByModename", query = "SELECT p FROM Paymentmode p WHERE p.modename = :modename"),
    @NamedQuery(name = "Paymentmode.findByIsdeleted", query = "SELECT p FROM Paymentmode p WHERE p.isdeleted = :isdeleted")})
public class Paymentmode implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "PaymentmodeID")
    private Long paymentmodeID;
    @Column(name = "modename")
    private String modename;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Paymentmode() {
    }

    public Paymentmode(Long paymentmodeID) {
        this.paymentmodeID = paymentmodeID;
    }

    public Long getPaymentmodeID() {
        return paymentmodeID;
    }

    public void setPaymentmodeID(Long paymentmodeID) {
        this.paymentmodeID = paymentmodeID;
    }

    public String getModename() {
        return modename;
    }

    public void setModename(String modename) {
        this.modename = modename;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (paymentmodeID != null ? paymentmodeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Paymentmode)) {
            return false;
        }
        Paymentmode other = (Paymentmode) object;
        if ((this.paymentmodeID == null && other.paymentmodeID != null) || (this.paymentmodeID != null && !this.paymentmodeID.equals(other.paymentmodeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Paymentmode[paymentmodeID=" + paymentmodeID + "]";
    }

}
